<template>
  <div>
    <a-drawer
      title="抽屉"
      :width="440"
      :visible="visible"
      :body-style="{ paddingBottom: '80px' }"
      :footer-style="{ textAlign: 'right' }"
      @close="onClose"
    >
      <slot />
      <div
        :style="{
          position: 'absolute',
          bottom: 0,
          width: '100%',
          borderTop: '1px solid #e8e8e8',
          padding: '10px 16px',
          textAlign: 'right',
          left: 0,
          background: '#fff',
          borderRadius: '0 0 4px 4px',
        }"
      >
        <a-button style="margin-right: 8px" @click="onClose">取消</a-button>
        <a-button type="primary" @click="onSuccess">确定</a-button>
      </div>
    </a-drawer>
  </div>
</template>
<script>
export default {
  props: ['RenderId', 'visible', 'onClose', 'onSuccess'],
  data() {
    return {}
  },
  components: {},
  mounted() {
    const dom = document.getElementById(this.RenderId)
    console.log('dom', dom)
    if (dom) {
      dom.style.position = 'relative'
    }
  },
  computed: {},
  methods: {},
}
</script>
<style lang="css" scoped>
/* .ant-drawer {
  position: absolute;
} */
</style>
